# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=libiodbc
pkgver=3.52.16
pkgrel=1
pkgdesc='Independent Open DataBase Connectivity for Linux'
arch=('loong64' 'x86_64')
url='http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/'
license=('LGPL')
depends=('bash')
makedepends=('chrpath')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/openlink/iODBC/archive/v${pkgver}.tar.gz")
sha256sums=('a0cf0375b462f98c0081c2ceae5ef78276003e57cdf1eb86bd04508fb62a0660')

build() {
	cd "iODBC-${pkgver}"

	./autogen.sh
	./configure \
		--prefix=/usr \
		--disable-static \
		--includedir=/usr/include/libiodbc \
		--disable-gui \
		--disable-libodbc
	make
}

package() {
	cd "iODBC-${pkgver}"

	make DESTDIR="${pkgdir}" install

	chrpath -d "${pkgdir}"/usr/bin/iodbctest{,w}
	rm -rf "${pkgdir}"/usr/share/libiodbc/
}
